<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>企业搜索</title>
  <link rel="stylesheet" href="../../css/public.css">
  <link rel="stylesheet" href="../../css/page.css">
</head>

<body>
  <div class="header">
    <img src="../../images/platformName.jpg" />
  </div>
  <div class="containerWrap clearfix" id="qyqjIndex" v-cloak>
    <left-bar :active_nav="active_nav" :nav_title="nav_title"></left-bar>8
    <div class="right_bar fl">
      <div class="searchCompany">
        <h3 class="text_center">企业全景信息检索</h3>
        <div class="searchInput clearfix">
          <input type="text" name="" id="" value="" class="fl" v-model.trim="entName" placeholder="请输入企业关键字"
            @keyup.enter="searchBtn" />
          <input type="button" value="搜索" class="fl" @click="searchBtn()" />
        </div>
        <div>
          <ul class="searchTypeCheck text_center">
            <li v-for="item in searchType">
              <label class="search_type">
                <input type="radio" v-model="typeChosed" :value="item.id" name="searchType" />
                <span></span>
                <span class="check_text">{{item.typeName}}</span>
              </label>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <script src="../../js/jquery.min.js"></script>
  <script src="../../js/vue2.2.0/vue.min.js"></script>
  <script src="../../js/template/leftNav.js"></script>
  <script type="text/javascript">
    var qyqjIndex = new Vue({
      el: "#qyqjIndex",
      components: {
        'left-bar': leftNav
      },
      data: {
        nav_title: "企业画像",
        active_nav: "企业全景",
        entName: '',
        searchType: [              //检索类型
          { "id": 0, "typeName": "智能检索" },
          { "id": 1, "typeName": "企业名称" },
          { "id": 2, "typeName": "注册地址" }
        ],
        typeChosed: 0,           //选中的检索类型
      },
      created() {
        localStorage.removeItem('searchCompany');

      },
      methods: {
        searchBtn: function () {
          var _this = this;
          if (_this.entName == "") {
            alert("请输入关键字");
            return false;
          } else {
            window.location.href = "enterpriseSearchResult.html?org_name=" + _this.entName + '&type=' + _this.typeChosed;
            _this.entName = '';
          }
        }
      }
    })
  </script>
</body>

</html>